<template>
<div>

  <h1>v-on注册事件</h1>
  <p>注册事件</p>
  <button @click='fn' @mouseenter='fn1'>按钮-{{msg}}</button>
</div>
</template>

<script>
export default {
data() {
    return {
        msg:'哈哈哈'
    }
},
methods: {
    fn () {
        console.log('你好啊');
    },
    fn1 () {
        console.log('加油啊');
    }
}
}
</script>

<style>

</style>